package com.example;
public class Movie {
    private String title;
    private String director;
    private String actors;
    private String synopsis;
    private int duration;
    private double rating;

    public Movie(String title, String director, String actors, String synopsis, int duration, double rating) {
        this.title = title;
        this.director = director;
        this.actors = actors;
        this.synopsis = synopsis;
        this.duration = duration;
        this.rating = rating;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public String getActors() {
        return actors;
    }

    public void setActors(String actors) {
        this.actors = actors;
    }

    public String getSynopsis() {
        return synopsis;
    }

    public void setSynopsis(String synopsis) {
        this.synopsis = synopsis;
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public double getRating() {
        return rating;
    }

    public void setRating(double rating) {
        this.rating = rating;
    }

    @Override
    public String toString() {
        return "片名: " + title +
                ", 导演: " + director +
                ", 主演: " + actors +
                ", 剧情简介: " + synopsis +
                ", 时长: " + duration + " 分钟" +
                ", 评分: " + rating;
    }
}